<%--
  Tag that acts as a container for all top level pages, including all relevant
  header, footer and nav elements.
  The body of this tag should include any required gadgets.

  This tag accepts the following attributes:
  bodyClass (optional) - class name that will be used in the page's <body> tag.
--%>
<%@ include file="/includes/taglibs.jspf"%>
<%@ include file="/includes/context.jspf"%>
<%@ tag language="java"%>
<%@ attribute name="isIndexPage" required="true" %>
<%@ attribute name="pageName" required="true" %>
<%@ attribute name="pageStartScripts" fragment="true"%>
<%@ attribute name="pageEndScripts" fragment="true"%>
<jsp:invoke fragment="pageStartScripts" var="pageStartScriptsFile" />
<jsp:invoke fragment="pageEndScripts" var="pageEndScriptsFile" />

<%-- This JSP contains the HTML, HEAD, TITLE and BODY tags and other META tags --%>
<jsp:include page="/includes/pageStart.jsp">
	<jsp:param name="pageStartScripts" value="${pageStartScriptsFile}" />
</jsp:include>
<c:if  test="${isIndexPage != 'true'}">
	<body class="normalpage">
</c:if>
<c:if  test="${isIndexPage == 'true'}">
	<body>
</c:if>
<section id="page">
	<div id="bodywrap">
		<section id="top">
			<jsp:include page="/includes/menu.jsp">
				<jsp:param name="pageName" value="${pageName}" />
			</jsp:include>
			<jsp:include page="/includes/header.jsp">
				<jsp:param name="isIndexPage" value="${isIndexPage}" />
			</jsp:include>
		</section>
		<section id="contentwrap">
			<jsp:doBody/>
		</section>
	</div>
	<jsp:include page="/includes/footer.jsp" />
	<jsp:include page="/includes/pageEnd.jsp">
		<jsp:param name="pageEndScripts" value="${pageEndScriptsFile}" />
	</jsp:include>
</section>
</body>
